home *** CD-ROM | disk | FTP | other *** search
- Path: geraldo.cc.utexas.edu!usenet
- From: Sundeep Agrawal <sundeep@psy.utexas.edu>
- Newsgroups: comp.lang.c++
- Subject: (no subject)
- Date: 4 Apr 1996 15:39:01 GMT
- Organization: student
- Message-ID: <4k0qel$h7n@geraldo.cc.utexas.edu>
- NNTP-Posting-Host: pcf75.psy.utexas.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Macintosh; I; PPC)
- X-URL: news:comp.lang.c++
-
- say i declare something like given below where Cell is a class
-
-
- Cell*** cpy1 = new Cell** [r];
- Cell** cpy2 = new Cell * [r*c];
-
- for( int i=0;i<c;i++)
- cpy1[i] = & cpy2[i*c];
-
- basically I am creating a 2 dimensional array
-
- where r = no of rows and c= no of cols
-
- also I have same as the above like cpy1 I have a and like cpy2 I have b
-
- Can I do something like this
-
- *(cpy1[i][j])=*(a[i][j]);
-
-
- is this dereferencing the pointer at cpy[i][j] or is there some other
- way ???
-
-
-
-
-
-